package com.hrpc;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtil {
    public static Date get(String pattern){
        SimpleDateFormat simpleDateFormat=new SimpleDateFormat("yyyy-MM-dd");
        try {
            Date date = simpleDateFormat.parse(pattern);
            return date;
        } catch (ParseException e) {
            throw new RuntimeException(e);
        }
    }

}
